//
//  TFLModalViewController.m
//  BMBlueMoonSFA
//
//  Created by mac on 16/6/5.
//  Copyright © 2016年 www.tang. All rights reserved.
//

#import "TFLModalViewController.h"
#import "TFLPush2ViewController.h"
#import "Masonry.h"

@interface TFLModalViewController ()

@end

@implementation TFLModalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor greenColor];
    
    //
    [self setUI];


}

/**
 *  设置ui
 */
-(void)setUI{

    
    //1.添加直接modal出来的控制器，带底部tabbar
    UIButton *btn1 =[UIButton buttonWithType:UIButtonTypeCustom];
    [btn1 addTarget:self action:@selector(btnClick1:) forControlEvents:UIControlEventTouchUpInside];
    btn1.backgroundColor = [UIColor redColor];
    [self.view addSubview:btn1];

    
    //布局
    [btn1 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.width.height.mas_equalTo(100);
        
        make.top.equalTo(@100);
        
        make.left.equalTo(@50);
        
    }];


}

-(void)btnClick1:(UIButton *)btn{
    
    
    NSLog(@"======");
    TFLPush2ViewController *pushVC = [[TFLPush2ViewController alloc] init];
    
    [self.navigationController pushViewController:pushVC animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
